<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8" />
    <title>07条件渲染</title>
    <script type="text/javascript" src="../js/vue.js"></script>
</head>

<body>
    <div id="demo">
        <h1>当前的和为{{sum}}</h1>
        <button @click="sum++">点我+1</button>
        <h2 v-show="sum === 1">Angular</h2>
        <h2 v-show="sum === 2">Reac</h2>
        <h2 v-show="sum === 3">Vue</h2>
        <h2 v-show="[1,2,3].indexOf(sum) ===-1">未知</h2>


        
    </div>
    <script type="text/javascript">
        Vue.config.productionTip = false
        new Vue({
            el: '#demo',
            data: {
                sum:0
            },
         
        })
    </script>
</body>

</html>